#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

typedef struct stu
{
	char name[20];
	int age;
	int grades;
}stu;

int main()
{
	stu s[5] = { 0 };
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		scanf("%s %d %d", s[i].name, &(s[i].age), &(s[i].grades));
		s[i].grades += s[i].grades * 0.2;
		if (s[i].grades > 600)
			s[i].grades = 600;
		printf("%s %d %d\n", s[i].name, s[i].age + 1, s[i].grades);
	}
	return  0;
}